<template>
    <div>
        {{ t("title") }}
        {{ t("name") }}
        {{ t('cartList.name2') }}
        <button @click="en">英文</button>
        <button @click="zh">中文</button>
    </div>
</template>
<script setup>
import {useI18n} from 'vue-i18n'
const { locale, t } = useI18n();
function en () {
    locale.value = 'en'
}
function zh() {
    locale.value = 'zh-cn'
}
</script>